// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';
import router from './router'
import config from './utils/config'
import Echarts from "echarts";

import './../static/NEditor/neditor.config.js'
import './../static/NEditor/neditor.all.js'
import './../static/NEditor/i18n/zh-cn/zh-cn.js'
import './../static/NEditor/neditor.parse.js'
import Print from './../static/print'
import 'babel-polyfill'

Vue.use(Print);
Vue.prototype.echarts = Echarts;

Vue.config.productionTip = false
Vue.prototype.CONFIG = config;
Vue.use(Echarts)
Vue.use(ElementUI,{ size: 'medium', zIndex: 3000 });
Vue.use(config)

router.beforeEach((to, from, next) => {
  /* 路由发生变化修改页面title */
  if (to.meta.title) {
    document.title = to.meta.title
  }
  next()
});

/* eslint-disable no-new */
var app = new Vue({
  el: '#app',
  router,
  components: { App },
  template: '<App/>'
})

export default app;
